// @vue/component
export default {
    name: 'Index',

    components: {},

    mixins: [],

    props: {},

    data () {
        return {
        }
    },

    computed: {},

    watch: {},

    created () {},

    methods: {
        confirm () {
            this.$refs.formRef.validate(valid => {
                if (valid) {
                    this.$store.dispatch('user/login', this.loginForm)
                        .then(() => {
                            this.$router.push({ path: this.redirect || '/' })
                        })
                        .catch(err => err)
                }
            })
        },
        resetForm () {
            this.$refs.formRef.resetFields()
        }
    }
}
